﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Padelcenter.Common
{
    public class Moneda : CommonInterface
    {
        #region Private Vars

        private int _idMoneda;
        private string _descripcion;
        private double _cotizacion;
        private string _simbolo;
        private bool _activo;
        private bool _conFiltroActivo;
        private bool _Disposed = false;

        #endregion

        #region Constructor

        public Moneda()
        { 
            this.ResetParams(); 
        }

        ~Moneda()
		{
			this.Dispose(false);
        }

        #endregion

        #region Properties

        public bool ConFiltroActivo
        {
            get { return _conFiltroActivo; }
            set { _conFiltroActivo = value; }
        }

        public bool Activo
        {
            get { return _activo; }
            set { _activo = value; }
        }

        public string Simbolo
        {
            get { return _simbolo; }
            set { _simbolo = value; }
        }

        public double Cotizacion
        {
            get { return _cotizacion; }
            set { _cotizacion = value; }
        }

        public string Descripcion
        {
            get { return _descripcion; }
            set { _descripcion = value; }
        }

        public int IdMoneda
        {
            get { return _idMoneda; }
            set { _idMoneda = value; }
        }

        #endregion

        #region Public Methods
        
        public void ResetParams()
        {
            this.IdMoneda = 0;
            this.Descripcion = string.Empty;
            this.Cotizacion = 0;
            this.Simbolo = string.Empty;
            this.Activo = true;
            this.ConFiltroActivo = false;
        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        protected virtual void Dispose(bool disposable)
        {
            if (!this._Disposed)
            {
                if (disposable)
                {
                    ReleaseManagedResources();
                }
                ReleaseUnmanagedResources();
            }
            _Disposed = true;
        }

        /// Release unmanaged resources
        protected virtual void ReleaseUnmanagedResources()
        {
        }

        /// Release managed resources		
        protected virtual void ReleaseManagedResources()
        {
        }

        #endregion

    }
}
